package com.game.dongzhao.bean;

import java.io.File;
import java.io.IOException;
import java.util.Scanner;

/**
 * 知识小卡片
 */
public class KnowledgeCard {
    /**
     * 知识小卡片
     */
    String[] cards=new String[30];
    public  void  KnowledgeCard() throws IOException {
        File file=new File("assert/words/main/knowledgecard.txt");
        Scanner input = new Scanner(file);//构造Scanner类来读取文件
        int i = 0;
        while (input.hasNext()) {
            String s = input.nextLine();//逐行读取到数组中
            cards[i] = s;
            i++;
        }
        input.close();
    }

    public static void main(String[] args) throws IOException {
        CopyWriter test = new CopyWriter();
        test.getTxt(new File("assert/words/main/knowledgecard.txt"));
        System.out.println(test.getAllTxt());
    }

    public String[] getKnowledgeCard() {
        return cards;
    }

    public void setKnowledgecard(String[] cards) {
        this.cards = cards;
    }

}

